﻿<UserControl x:Class="LiveTiss.Guias.UserControls.ProcedimentosRealizadosProcedimentoRealizado"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:uc="clr-namespace:LiveTiss.Guias.UserControls"
    xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
    mc:Ignorable="d" x:Name="ucProcedimentos" Width="860">

    <UserControl.Resources>
        <converter:EnumConverter x:Key="enumConverter"  />
        <converter:BoolToVisibilityConverter x:Key="visibilityConverter" />
    </UserControl.Resources>

    <StackPanel>
        <toolkit:WrapPanel Orientation="Horizontal">
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Codigo Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.procedimento.codigo,ElementName=ucProcedimentos,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="180" />
                </StackPanel>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Descrição Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.procedimento.descricao,ElementName=ucProcedimentos,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="180" />
                </StackPanel>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Tabela" FontFamily="Segoe UI" FontSize="13.333"/>
                    <ComboBox HorizontalAlignment="Left" Margin="0,6,0,0" Width="180" 
                        ItemsSource="{Binding Path=Value.procedimento.tipoTabelaItems,ElementName=ucProcedimentos,Mode=OneWay}"
                        SelectedIndex="{Binding Path=Value.procedimento.tipoTabela,ElementName=ucProcedimentos,Mode=TwoWay,Converter={StaticResource enumConverter},ConverterParameter='Tabela',ValidatesOnDataErrors=True,NotifyOnValidationError=True}" />
                </StackPanel>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Data" FontFamily="Segoe UI" FontSize="13.333"/>
                    <sdk:DatePicker HorizontalAlignment="Left" Margin="0,6,0,0"
                            SelectedDate="{Binding Path=Value._data,ElementName=ucProcedimento,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
                </StackPanel>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Hora Inicio" FontFamily="Segoe UI" FontSize="13.333"/>
                    <toolkit:TimePicker HorizontalAlignment="Left" Margin="0,6,0,0" x:Name="timePicker" PopupMinutesInterval="15"
                                Width="79" Value="{Binding Path=Value._horaInicio,ElementName=ucProcedimentos,Mode=TwoWay}"/>
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Hora Fim" FontFamily="Segoe UI" FontSize="13.333"/>
                    <toolkit:TimePicker HorizontalAlignment="Left" Margin="0,6,0,0" PopupMinutesInterval="15"
                                Width="79" Value="{Binding Path=Value._horaFim,ElementName=ucProcedimentos,Mode=TwoWay}"/>
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Quantidade Realizada" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.quantidadeRealizada,ElementName=ucProcedimentos,Mode=TwoWay,ValidatesOnDataErrors=True,NotifyOnValidationError=True}" Width="180" />
                </StackPanel>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Via de Acesso" FontFamily="Segoe UI" FontSize="13.333"/>
                    <ComboBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" SelectedValue="Key" DisplayMemberPath="Value"
                        ItemsSource="{Binding Path=Value.viaDeAcessoItems,ElementName=ucProcedimentos,Mode=OneWay}"
                        SelectedIndex="{Binding Path=Value.viaAcesso,ElementName=ucProcedimentos,Mode=TwoWay,
                                        Converter={StaticResource enumConverter},ConverterParameter='ViaDeAcesso',ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Tecnica Utilizada" FontFamily="Segoe UI" FontSize="13.333"/>
                    <ComboBox Width="180" Margin="0,6,0,0" HorizontalAlignment="Left" SelectedValue="Key" DisplayMemberPath="Value"
                        ItemsSource="{Binding Path=Value.tecnicaUtilizadaItems,ElementName=ucProcedimentos,Mode=OneWay}"
                        SelectedIndex="{Binding Path=Value.tecnicaUtilizada,ElementName=ucProcedimentos,Mode=TwoWay,
                                        Converter={StaticResource enumConverter},ConverterParameter='TecnicaUtilizada',ValidatesOnDataErrors=True,NotifyOnValidationError=True}"/>
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Redução Acrescimo" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.reducaoAcrescimo,ElementName=ucProcedimentos,Mode=TwoWay}" Width="180" />
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Valor" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.valor,ElementName=ucProcedimentos,Mode=TwoWay}" Width="180" />
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
            <Grid Width="210" Margin="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.024*"/>
                    <ColumnDefinition Width="0.976*"/>
                </Grid.ColumnDefinitions>
                <StackPanel Grid.ColumnSpan="2" Margin="0" Grid.Column="2">
                    <TextBlock TextWrapping="Wrap" Text="Valor Total" FontFamily="Segoe UI" FontSize="13.333"/>
                    <TextBox HorizontalAlignment="Left" Margin="0,6,0,0" 
                        Text="{Binding Path=Value.valorTotal,ElementName=ucProcedimentos,Mode=TwoWay}" Width="180" />
                </StackPanel>
                <TextBlock TextWrapping="Wrap" Text="*" FontFamily="Segoe UI" FontWeight="Bold" FontSize="21.333" Foreground="#FF307852" Height="16" VerticalAlignment="Top" Margin="0,0,3,0" d:LayoutOverrides="Width"/>
            </Grid>
        </toolkit:WrapPanel>
    </StackPanel>
</UserControl>
